package cn.xuchunh.campusbbs.adapter;

import android.content.Context;
import android.view.ViewGroup;

import cn.xuchunh.campusbbs.R;
import cn.xuchunh.campusbbs.base.BaseRecyclerViewAdapter;
import cn.xuchunh.campusbbs.bean.Forum;
import cn.xuchunh.campusbbs.viewholder.SimpleViewHolder;

/**
 * Created by XuChunH on 2015/9/26.
 */
public class ChildForumAdapter extends BaseRecyclerViewAdapter<SimpleViewHolder, Forum> {

    public ChildForumAdapter(Context context) {
        super(context);
    }

    @Override
    public SimpleViewHolder onCreateContentViewHolder(ViewGroup parent, int viewType) {
        return new SimpleViewHolder( inflater.inflate(R.layout.item_simple, parent, false));
    }

    @Override
    protected void onBindContentViewHolder(SimpleViewHolder holder, int position) {
        Forum forum = dataList.get(position);
        if (forum != null) {
            holder.title.setText(forum.getName());
        }
    }

}
